package com.umeng.analytics.pro;

import java.security.KeyStore;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;

class ao implements X509TrustManager {
    X509TrustManager a;

    public ao() {
        int v0_2;

        try {
            TrustManagerFactory v0_1 = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
            v0_1.init((KeyStore) null);
            TrustManager[] v1 = v0_1.getTrustManagers();
            v0_2 = 0;
            while (true) {
                if (v0_2 >= v1.length) {
                    return;
                }

                if (!(v1[v0_2] instanceof X509TrustManager)) {
                    ++v0_2;
                    continue;
                }
                this.a = (X509TrustManager) v1[v0_2];
                return;
            }
        } catch (Throwable v0) {
            return;
        }


    }

    public void checkClientTrusted(X509Certificate[] arg1, String arg2) {
    }

    public void checkServerTrusted(X509Certificate[] arg2, String arg3) {
        try {
            this.a.checkServerTrusted(arg2, arg3);
        } catch (CertificateException v0) {
        }
    }

    public X509Certificate[] getAcceptedIssuers() {
        return this.a.getAcceptedIssuers();
    }
}

